//
//  MovieListCell.m
//  UI_豆瓣
//
//  Created by WangZe on 15/10/12.
//  Copyright © 2015年 王泽龙. All rights reserved.
//

#import "MovieListCell.h"

@implementation MovieListCell
- (void)dealloc
{
    [_mvName release];
    [_mvView release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView
{
    self.mvView = [[UIView alloc] init];
    [self.contentView addSubview:self.mvView];
    self.mvView.layer.cornerRadius = 10;
    self.mvView.backgroundColor = [UIColor colorWithRed:196 / 255.0 green:215 / 255.0 blue:223 / 255.0 alpha:1];
    [_mvView release];
    
    self.mvimageView = [[UIImageView alloc] init];
    [self.mvView addSubview:self.mvimageView];
    
    self.mvimageView.layer.cornerRadius = 10;
    //    self.mvimageView.backgroundColor = [UIColor redColor];
    [_mvimageView release];
    
    self.mvName = [[UILabel alloc] init];
    [self.mvView addSubview:self.mvName];
    [_mvName release];
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.mvView.frame = CGRectMake(10, 15, self.contentView.frame.size.width - 25, self.contentView.frame.size.height - 15);
    self.mvimageView.frame = CGRectMake(10, 5, self.mvView.frame.size.width / 3, self.mvView.frame.size.height -5);
    self.mvName.frame = CGRectMake(self.mvView.frame.size.width / 3 + 35 , self.mvView.frame.size.height / 3, self.mvView.frame.size.width , self.mvView.frame.size.height / 3);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
